package cn.bonoon.kernel.expression.results;

import org.batatasframework.web.RequestParameterReader;

import cn.bonoon.kernel.expression.ExpressionParseContext;
import cn.bonoon.kernel.expression.ExpressionValue;
import cn.bonoon.kernel.support.IOperator;

public class SesssionExpressionValue implements ExpressionValue{
	private final String name;
	
	public SesssionExpressionValue(ExpressionParseContext context, String name){
		this.name = name;
	}

	@Override
	public Object value(IOperator operator, RequestParameterReader parameterReader, Object defaultValue) {
		return parameterReader.getAttribute(name);
	}

}
